package cn.iocoder.yudao.framework.pay.core.client.impl.hftx.vo;

/**
 * 汇付天下支付状态枚举类
 *
 * @author sisansan
 * @date 2025/3/5
 */
public enum TransStatEnum {

    P("P", "处理中"),

    S("S", "成功"),

    F("F", "失败"),

    I("I", "初始");

    private final String code;
    private final String desc;

    TransStatEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static TransStatEnum getByCode(String code) {
        for (TransStatEnum type : values()) {
            if (type.getCode().equals(code)) {
                return type;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
